#include <sys/types.h>
#include <sys/stat.h>
#incudle <fcntl.h>
/* Called from the main */
int main(int argc, char **argv)
{
 	int fd;
 	int i;
 	char name[20] = "/mnt/sdc/dvd.avi";
 	char buffer[0x1000];
 	int len;

 	if (fd = (open(name, O_RDONLY, 0)) == -1) {
      perror (name);
      exit (-1);
    }
    /* read the file header */
    i = 0;
    while (1) {
	 len = read (fd, buffer, 0x1000);
	 i += len;
	 printf("read out 0x%x\n", i)
	 if (len != 0x1000){
	  printf("End of file\n");
	  break;
	 }

    return 0;
}
